package com.service_api.service;


import com.service_api.model.DistrictCount;
import com.service_api.repository.DistrictCountRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DistrictCountService {
    @Autowired
    DistrictCountRepository districtCountRepository;

    public List<DistrictCount> findDistrictList(){
        return districtCountRepository.findAll();
    }

    public List<DistrictCount> findByCity(String city){
        return districtCountRepository.findAllByCity(city);
    }
}
